package app;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import custom.ScaleImagesActivity;
import menhoo.com.i8officelibrary.R;

/**
 * Created by yanglei on 16/1/3.
 */
public class ScaleImage extends ScaleImagesActivity {
    Button menu_btn_info;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        getRightCustom().addView(getLayoutInflater().inflate(R.layout.menu_info,null));

        if(getFileInfo()!=null){
            menu_btn_info =(Button)findViewById(R.id.menu_btn_info);
            menu_btn_info.setText("详情");
            menu_btn_info.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    Intent it = new Intent(ScaleImage.this, PreviewFileInfo.class);// 创建Intent对象
                    //imgInfo
                    it.putExtra("imageInfo", getImageInfo());
                    //fileInfo
                    it.putExtra("fileInfo", getFileInfo());

                    startActivity(it);
                    onBackPressed();
                }
            });
        }

    }
}
